package santiago.domain;

import java.io.Serializable;

/**
 *
 * @author Florent
 */
@SuppressWarnings("serial")
public class GameParameters implements Serializable {

    private String Name;
    private byte Player;
    private DifficultyLevel Level;
    private boolean DisplayCash;
    private boolean PalmTree;
    private byte RoundNbr;
    private Plantation DeletedPlantation;

    public GameParameters(String GameName, byte PlayerNbr, DifficultyLevel Level, boolean DisplayCash, boolean PalmTree) {
        this.Name = GameName;
        this.Player = PlayerNbr;
        this.Level = Level;
        this.DisplayCash = DisplayCash;
        this.PalmTree = PalmTree;
        RoundNbr = (byte) (PlayerNbr > 4 ? 9 : 11);
    }

    public String getName() {
        return Name;
    }

    public byte getPlayerCount() {
        return Player;
    }

    public DifficultyLevel getLevel() {
        return Level;
    }

    public boolean isCashDisplayed() {
        return DisplayCash;
    }

    public boolean hasPalmTree() {
        return PalmTree;
    }

    public byte getRoundNbr() {
        return RoundNbr;
    }

    public byte getPlantationLotCount() {
        return (byte) (Player < 5 ? 4 : 5);
    }

    public Plantation getDeletedPlantation() {
        return DeletedPlantation;
    }

    public void setDeletedPlantation(Plantation DeletedPlantation) {
        this.DeletedPlantation = DeletedPlantation;
    }
}
